import React, { Component } from 'react';
import Style from './SubmitButton.less';

class SubmitButton extends Component {

  handleClick = (e) => {
		if(typeof this.props.onClick === 'function') {
			this.props.onClick(e);
		} else {
			return;
		}
	}

  render() {
    return (
      <div
          onClick={this.props.handleClick}
          className={[Style.base]}
          style={this.props.style}
      >
        {this.props.context}
      </div>
    )
  }
}

export default SubmitButton